﻿
@{
    ViewBag.Title = "Sparkline";
}

<div class="row wrapper border-bottom white-bg page-heading">
    <div class="col-lg-10">
        <h2>Sparkline Charts</h2>
        <ol class="breadcrumb">
            <li>
                <a href="@Url.Action("Dashboard_1", "Dashboards")">Home</a>
            </li>
            <li>
                <a>Graphs</a>
            </li>
            <li class="active">
                <strong>Sparkline Charts</strong>
            </li>
        </ol>
    </div>
    <div class="col-lg-2">

    </div>
</div>
<div class="wrapper wrapper-content animated fadeInDown">

    <div class="row">
        <div class="col-lg-5">
            <div class="jumbotron">
                <h1>Sparkline</h1>
                <p>It's another graet library for inline graphics visualization.</p>
                <p>
                    <a href="http://omnipotent.net/jquery.sparkline" target="_blank" class="btn btn-primary btn-lg" role="button">Learn more about Sparkline</a>
                </p>
            </div>
        </div>
        <div class="col-lg-7">
            <div class="ibox float-e-margins">
                <div class="ibox-title">
                    <h5>Sparkline Charts <small>With custom colors.</small></h5>
                    <div class="ibox-tools">
                        <a class="close-link">
                            <i class="fa fa-times"></i>
                        </a>
                    </div>
                </div>
                <div>
                    <table class="table table-bordered white-bg">
                        <thead>
                            <tr>
                                <th>Graph</th>
                                <th>Type</th>
                            </tr>
                        </thead>

                        <tbody>
                            <tr>
                                <td>
                                    <span id="sparkline1"></span>
                                </td>
                                <td>
                                    Inline line chart
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    <span id="sparkline2"></span>
                                </td>
                                <td>
                                    Bar chart
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    <span id="sparkline3"></span>
                                </td>
                                <td>
                                    Pie chart
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    <span id="sparkline4"></span>
                                </td>
                                <td>
                                    Long inline chart
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    <span id="sparkline5"></span>
                                </td>
                                <td>
                                    Tristate chart
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    <span id="sparkline6"></span>
                                </td>
                                <td>
                                    Discrete chart
                                </td>
                            </tr>
                        </tbody>
                    </table>
                </div>
            </div>
        </div>
    </div>
    <div class="row">
        <div class="col-lg-4">
            <div class="ibox float-e-margins">
                <div class="ibox-title">
                    <h5>Custom pie size example</h5>
                    <div class="ibox-tools">
                        <a class="collapse-link">
                            <i class="fa fa-chevron-up"></i>
                        </a>
                        <a class="dropdown-toggle" data-toggle="dropdown" href="#">
                            <i class="fa fa-wrench"></i>
                        </a>
                        <ul class="dropdown-menu dropdown-user">
                            <li>
                                <a href="#">Config option 1</a>
                            </li>
                            <li>
                                <a href="#">Config option 2</a>
                            </li>
                        </ul>
                        <a class="close-link">
                            <i class="fa fa-times"></i>
                        </a>
                    </div>
                </div>
                <div class="ibox-content text-center h-200">
                    <span id="sparkline7"></span>
                </div>
            </div>
        </div>
        <div class="col-lg-4">
            <div class="ibox float-e-margins">
                <div class="ibox-title">
                    <h5>Custom bar size example</h5>
                    <div class="ibox-tools">
                        <a class="collapse-link">
                            <i class="fa fa-chevron-up"></i>
                        </a>
                        <a class="dropdown-toggle" data-toggle="dropdown" href="#">
                            <i class="fa fa-wrench"></i>
                        </a>
                        <ul class="dropdown-menu dropdown-user">
                            <li>
                                <a href="#">Config option 1</a>
                            </li>
                            <li>
                                <a href="#">Config option 2</a>
                            </li>
                        </ul>
                        <a class="close-link">
                            <i class="fa fa-times"></i>
                        </a>
                    </div>
                </div>
                <div class="ibox-content text-center h-200">
                    <span id="sparkline8"></span>
                </div>
            </div>
        </div>
        <div class="col-lg-4">
            <div class="ibox float-e-margins">
                <div class="ibox-title">
                    <h5>Custom line size example</h5>
                    <div class="ibox-tools">
                        <a class="collapse-link">
                            <i class="fa fa-chevron-up"></i>
                        </a>
                        <a class="dropdown-toggle" data-toggle="dropdown" href="#">
                            <i class="fa fa-wrench"></i>
                        </a>
                        <ul class="dropdown-menu dropdown-user">
                            <li>
                                <a href="#">Config option 1</a>
                            </li>
                            <li>
                                <a href="#">Config option 2</a>
                            </li>
                        </ul>
                        <a class="close-link">
                            <i class="fa fa-times"></i>
                        </a>
                    </div>
                </div>
                <div class="ibox-content text-center h-200">
                    <span id="sparkline9"></span>
                </div>
            </div>
        </div>

    </div>
</div>

@section Scripts {
    @Scripts.Render("~/plugins/sparkline")

    <script type="text/javascript">
        $(document).ready(function () {

            $("#sparkline1").sparkline([34, 43, 43, 35, 44, 32, 44, 52, 25], {
                type: 'line',
                lineColor: '#17997f',
                fillColor: '#1ab394',
            });
            $("#sparkline2").sparkline([5, 6, 7, 2, 0, -4, -2, 4], {
                type: 'bar',
                barColor: '#1ab394',
                negBarColor: '#c6c6c6'
            });

            $("#sparkline3").sparkline([1, 1, 2], {
                type: 'pie',
                sliceColors: ['#1ab394', '#b3b3b3', '#e4f0fb']
            });

            $("#sparkline4").sparkline([34, 43, 43, 35, 44, 32, 15, 22, 46, 33, 86, 54, 73, 53, 12, 53, 23, 65, 23, 63, 53, 42, 34, 56, 76, 15, 54, 23, 44], {
                type: 'line',
                lineColor: '#17997f',
                fillColor: '#ffffff',
            });

            $("#sparkline5").sparkline([1, 1, 0, 1, -1, -1, 1, -1, 0, 0, 1, 1], {
                type: 'tristate',
                posBarColor: '#1ab394',
                negBarColor: '#bfbfbf'
            });


            $("#sparkline6").sparkline([4, 6, 7, 7, 4, 3, 2, 1, 4, 4, 5, 6, 3, 4, 5, 8, 7, 6, 9, 3, 2, 4, 1, 5, 6, 4, 3, 7, ], {
                type: 'discrete',
                lineColor: '#1ab394'
            });

            $("#sparkline7").sparkline([52, 12, 44], {
                type: 'pie',
                height: '150px',
                sliceColors: ['#1ab394', '#b3b3b3', '#e4f0fb']
            });

            $("#sparkline8").sparkline([5, 6, 7, 2, 0, 4, 2, 4, 5, 7, 2, 4, 12, 14, 4, 2, 14, 12, 7], {
                type: 'bar',
                barWidth: 8,
                height: '150px',
                barColor: '#1ab394',
                negBarColor: '#c6c6c6'
            });

            $("#sparkline9").sparkline([34, 43, 43, 35, 44, 32, 15, 22, 46, 33, 86, 54, 73, 53, 12, 53, 23, 65, 23, 63, 53, 42, 34, 56, 76, 15, 54, 23, 44], {
                type: 'line',
                lineWidth: 1,
                height: '150px',
                lineColor: '#17997f',
                fillColor: '#ffffff',
            });
        });
    </script>
}